
// 类组件
import { Component } from 'react'

export default class child1 extends Component {
    state = {
        cb: 'from child1'
    }
    cbs = () => {
        this.props.cb(this.state.cb)
    }
    render() {
        return (
            <div>
                <button onClick={this.cbs}>child1button</button>
            </div>
        )
    }
}